Skip to content

fix(hono): Use generic Hono type in Bun/Node#21060

Merged
s1gr1d merged 2 commits into
developfrom
sig/hono-type-fix
May 21, 2026
Merged

fix(hono): Use generic Hono type in Bun/Node#21060
s1gr1d merged 2 commits into
developfrom
sig/hono-type-fix

Conversation

@s1gr1d
Copy link
Copy Markdown
Member

@s1gr1d s1gr1d commented May 20, 2026

Fixes the generic type for sentry() and also adds some additional tests for the case mentioned in the attached issue.

The below attached issue also described that mounting sentry() as middleware broke .get() routes used by third-party libraries like hono-openapi and @scalar/hono-api-reference (which was fixed in #20954). Previously, Hono's internals were patched in a way that corrupted route state. The current version uses Proxy + Reflect.apply for all patches, which preserves the routing table intact and doesn't touch .get() at all.

Closes #21019

@s1gr1d s1gr1d requested a review from a team as a code owner May 20, 2026 10:28
@s1gr1d s1gr1d requested a review from andreiborza May 20, 2026 10:28
Comment thread dev-packages/e2e-tests/test-applications/hono-4/src/routes.ts
@chargome chargome self-requested a review May 20, 2026 14:15
@andreiborza
Copy link
Copy Markdown
Member

Thanks for the extra test, nice!

@s1gr1d s1gr1d merged commit cb6da8e into develop May 21, 2026
262 of 263 checks passed
@s1gr1d s1gr1d deleted the sig/hono-type-fix branch May 21, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[@sentry/hono] sentry() middleware breaks .get() routes — Scalar UI and openapi.json return empty/blank

3 participants